<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path;
%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>AdminLTE | Data Tables</title>
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>


    <!-- start分页需要使用以下三个js -->
    <script type="text/javascript" src="<%=basePath%>/js/jquery-2.1.1.min.js"></script>
    <script type="text/javascript" src="<%=basePath%>/js/admin/utils.js"></script>
    <script type="text/javascript" src="<%=basePath%>/js/base/listtable.js"></script>
    <!-- end分页需要使用以上三个js -->

    <style>
        .table th, .table td {
            text-align: center;
            vertical-align: middle !important;
        }
    </style>
</head>
<body class="skin-blue">
<!-- header logo: style can be found in header.less -->


<!-- getHeader -->
<s:action name="getHeader" namespace="/privilege" executeResult="true"/>
<div class="wrapper row-offcanvas row-offcanvas-left">
    <!-- Left side column. contains the logo and sidebar -->

    <!-- getMenus -->
    <s:action name="getMenus" namespace="/privilege" executeResult="true"/>

    <!-- Right side column. Contains the navbar and content of the page -->
    <aside class="right-side">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>

                <small>用户管理-患者</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
                <li><a href="#">Tables</a></li>
                <li class="active">Data tables</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <div class="col-xs-12">
                    <div class="box">

                        <div class="box box-danger">

                            <div class="box-body">

                                <form action="javascript:searchUser();" class="form-inline" name="searchForm">

                                    <div class="row" align="center">
                                        <lable class="control-label" style="float: left;margin-left: 30px">用户ID</lable>
                                        <div class="col-sm-2">
                                            <input type="text" id="condition1" class="input-small form-control" placeholder="用户ID">
                                        </div>
                                        <lable class="control-label" style="float: left">用户号码</lable>
                                        <div class="col-sm-2">
                                            <input type="text" id="condition2" class="input-small form-control" placeholder="用户号码">
                                        </div>
                                        <lable class="control-label" style="float: left">用户姓名</lable>
                                        <div class="col-sm-2">
                                            <input type="text" id="condition3" class="input-small form-control" placeholder="用户姓名">
                                        </div>
                                        <button type="submit" class="btn btn-info" style="float: left">查询</button>
                                    </div>
                                    <br/>
                                </form>
                            </div>
                            <!-- /.box-body -->
                        </div>
                        <!-- /.box -->


                    </div>

                    <div class="box">
                        <!-- 用户列表 -->
                        <form method="post" target="_self" action="" name="listForm">
                            <div class="box-body table-responsive" id="listDiv">

                                <s:property value="res" escape="false"/>
                            </div><!-- /.box-body -->
                        </form>
                    </div>
                </div>
            </div>
        </section><!-- /.content -->
    </aside><!-- /.right-side -->
</div><!-- ./wrapper -->
</body>


<script type="text/javascript">

    //查询用户列表
    function searchUser() {
        listTable.filter['userid'] = Utils.trim(document.forms['searchForm'].elements['condition1'].value);
        listTable.filter['userNo'] = Utils.trim(document.forms['searchForm'].elements['condition2'].value);
        listTable.filter['userName'] = Utils.trim(document.forms['searchForm'].elements['condition3'].value);
        listTable.filter['currentPage']=1;
        listTable.action = "<%=basePath%>/privilege/ajaxQueryUser.action";
        listTable.loadList();
    }

    $(document).ready(new function () {
        searchUser();
    })
</script>
</html>